473,416 Members | 1,564 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,416 software developers and data experts.

Image Browse Button

Hello,

Is there a way to make the browse button an image?

Thanks,
Miguel

Aug 25 '07 #1
9 12231
shapper wrote:
Is there a way to make the browse button an image?
What browse button would that be?

Do you have a URL to something relevant?

--
-bts
-Motorcycles defy gravity; cars just suck
Aug 25 '07 #2
shapper wrote:
Is there a way to make the browse button an image?
Two easy ways:

<INPUT TYPE=IMAGE SRC=smiley.gif onClick="alert('Ouch! My nose!')">
<P>
<BUTTON onClick="alert('You clicked the button')">Click: <IMG
SRC=/smiley.gif></BUTTON>

They both have drawbacks, if you plan to submit the form, and not just
use onClick events as I have above:

1. The <INPUT TYPE=TEXTgenerates X and Y co-ordinates within the
image. Whatever handles the form has to know what to do with these
2. The <BUTTONsends some very non-standard form data if the browser is
Internet Explorer. Easier to rely only on the NAME of the button
(which I didn't include above).

You can see this page working at http://swiftys.org.uk/image.html

--
Steve Swift
http://www.swiftys.org.uk/swifty.html
http://www.ringers.org.uk
Aug 25 '07 #3
Steve Swift <St***********@gmail.comwrites:
shapper wrote:
>Is there a way to make the browse button an image?

Two easy ways:

<INPUT TYPE=IMAGE SRC=smiley.gif onClick="alert('Ouch! My nose!')">
<P>
<BUTTON onClick="alert('You clicked the button')">Click: <IMG
SRC=/smiley.gif></BUTTON>
I think the OP wants to know how to style the button that often
accompanies <input type=file>.

I don't have an answer since I prefer to leave controls as they are to
aid in recognition, but I can help clarify the objective.

--
Ben.
Aug 26 '07 #4
Rik
On Sun, 26 Aug 2007 02:42:35 +0200, Ben Bacarisse <be********@bsb.me.uk>
wrote:
Steve Swift <St***********@gmail.comwrites:
>shapper wrote:
>>Is there a way to make the browse button an image?

Two easy ways:

<INPUT TYPE=IMAGE SRC=smiley.gif onClick="alert('Ouch! My nose!')">
<P>
<BUTTON onClick="alert('You clicked the button')">Click: <IMG
SRC=/smiley.gif></BUTTON>

I think the OP wants to know how to style the button that often
accompanies <input type=file>.
If that's the question: no, it cannot be done. You cannot style the
'browse' button reliably.
--
Rik Wasmus
Aug 26 '07 #5
On Aug 26, 3:50 am, Rik <luiheidsgoe...@hotmail.comwrote:
On Sun, 26 Aug 2007 02:42:35 +0200, Ben Bacarisse <ben.use...@bsb.me.uk>
wrote:
Steve Swift <Steve.J.Sw...@gmail.comwrites:
shapper wrote:
Is there a way to make the browse button an image?
Two easy ways:
<INPUT TYPE=IMAGE SRC=smiley.gif onClick="alert('Ouch! My nose!')">
<P>
<BUTTON onClick="alert('You clicked the button')">Click: <IMG
SRC=/smiley.gif></BUTTON>
I think the OP wants to know how to style the button that often
accompanies <input type=file>.

If that's the question: no, it cannot be done. You cannot style the
'browse' button reliably.
--
Rik Wasmus
Yes, I want to style the button that accompanies <input type=file>.

I have seen this one or twice and it seemed to work fine ...

Any idea?

Thanks,
Miguel

Aug 26 '07 #6
On Aug 26, 3:50 am, Rik <luiheidsgoe...@hotmail.comwrote:
On Sun, 26 Aug 2007 02:42:35 +0200, Ben Bacarisse <ben.use...@bsb.me.uk>
wrote:
Steve Swift <Steve.J.Sw...@gmail.comwrites:
shapper wrote:
Is there a way to make the browse button an image?
Two easy ways:
<INPUT TYPE=IMAGE SRC=smiley.gif onClick="alert('Ouch! My nose!')">
<P>
<BUTTON onClick="alert('You clicked the button')">Click: <IMG
SRC=/smiley.gif></BUTTON>
I think the OP wants to know how to style the button that often
accompanies <input type=file>.

If that's the question: no, it cannot be done. You cannot style the
'browse' button reliably.
--
Rik Wasmus
Hi,

Here is an ASP.NET control that does just that:

http://www.telerik.com/demos/aspnet/...DefaultCS.aspx

A few demos:
http://www.telerik.com/demos/aspnet/...DefaultCS.aspx
http://www.telerik.com/demos/aspnet/...DefaultCS.aspx

This seems to work fine.

How is this done? Any idea?

Thanks,
Miguel
Aug 26 '07 #7
..oO(shapper)
>Yes, I want to style the button that accompanies <input type=file>.
There's no reliable way to do that.
>I have seen this one or twice and it seemed to work fine ...
Most likely an ugly JavaScript hack.

Micha
Aug 27 '07 #8
rf

"shapper" <md*****@gmail.comwrote in message
news:11**********************@k79g2000hse.googlegr oups.com...
On Aug 26, 3:50 am, Rik <luiheidsgoe...@hotmail.comwrote:
>On Sun, 26 Aug 2007 02:42:35 +0200, Ben Bacarisse <ben.use...@bsb.me.uk>
wrote:
Steve Swift <Steve.J.Sw...@gmail.comwrites:
>shapper wrote:
Is there a way to make the browse button an image?
>Two easy ways:
><INPUT TYPE=IMAGE SRC=smiley.gif onClick="alert('Ouch! My nose!')">
<P>
<BUTTON onClick="alert('You clicked the button')">Click: <IMG
SRC=/smiley.gif></BUTTON>
I think the OP wants to know how to style the button that often
accompanies <input type=file>.

If that's the question: no, it cannot be done. You cannot style the
'browse' button reliably.
--
Rik Wasmus

Hi,

Here is an ASP.NET control that does just that:

http://www.telerik.com/demos/aspnet/...DefaultCS.aspx

A few demos:
http://www.telerik.com/demos/aspnet/...DefaultCS.aspx
http://www.telerik.com/demos/aspnet/...DefaultCS.aspx

This seems to work fine.
Nope. They don't work fine.
How is this done? Any idea?

They are overlaying (z-index) a normal <input type=filewith an <input
type=textand an <input type=buttonand styling the button. They are not
styling the <input type=filebutton which is, of course, generated by the
browser.

I didn't research the javascript skulduggery that must be going on behind
the scenes.

--
Richard.
Aug 27 '07 #9
shapper meinte:
Here is an ASP.NET control that does just that:

http://www.telerik.com/demos/aspnet/...DefaultCS.aspx

A few demos:
http://www.telerik.com/demos/aspnet/...DefaultCS.aspx
http://www.telerik.com/demos/aspnet/...DefaultCS.aspx

This seems to work fine.

How is this done? Any idea?
Get yourself some tools and find out yourself.
I'd suggest FireBug and DomInspector. It's easy. Really.

Gregor
--
http://www.gregorkofler.at ::: Landschafts- und Reisefotografie
http://www.licht-blick.at ::: Forum für Multivisionsvorträge
http://www.image2d.com ::: Bildagentur für den alpinen Raum
Aug 29 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Fred | last post by:
Hi I am searching for a module, that would allow me to call files by using a 'browse' button. Is there any uniform module for browsing files, or is there a special module for *.txt files? Thanks...
5
by: Ron Brennan | last post by:
Good afternoon. The entire task that I'm trying to achieve is to allow a user to browse and upload multiple files simultaneously, hiding the Browse button of <input> tags of type="file" and...
2
by: conckrish | last post by:
Hi all, This is all about ASP.NET WEB APPLICATION... I have a Button and when i click that button... i need to open the File Dialog through Which i have to select the Image Path... And When...
1
by: akshakeel | last post by:
Hi all, Is it possible to apply style to browse button, the code for which is, <input type="file"> I want to add a background image to the "Browse" button. (using css) But the problem im...
0
by: sreenulanka | last post by:
when i am clicking the browse button image not opened in my applet please help me. // browse button, generate browse event when it clicks if (e.getSource()==browse) { ...
4
by: developing | last post by:
Hi All, I have a browse button that the user can click to select a file. The button then fetches the file path. This is all working fine except my boss wants some add functionality. I need it to...
8
by: gomzi | last post by:
Hi, I would like to know as to how one could replace the normal browse button (file upload control) with an image. Thanks, Gomzi.
1
by: ipa | last post by:
Hello, I made one browse button in asp form to store files. Now i am facing the problem is when i am editing that asp form. In that i call browse button during edit.but during edit, that...
0
by: Bobby Edward | last post by:
All of a sudden my "Browse..." button doesn't work anymore. This is the button in the CSS "Modify Style" dialog for "background-image:". I've rebooted and it still fails. Any idea how to fix...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.